package com.bw.controller;

import com.bw.bean.Vo;
import com.bw.service.OrderInfoService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class OrderInfoController {


    @Autowired
    OrderInfoService orderInfoService;


    @RequestMapping("/find1")
    public Map find1(){

        Double list=orderInfoService.find1();

        return SugarUtil.getFlipNumberData(list);


    }


    @RequestMapping("/find2")
    public Map find2(){

        List<Vo> list=orderInfoService.find2();

        return SugarUtil.getMapData(list);


    }



    @RequestMapping("/find3")
    public Map find3(){

        List<Map> list=orderInfoService.find3();

        return SugarUtil.getBarData(list);


    }








}
